package com.sdb.docters.service.impl;

import java.util.List;
import com.sdb.common.utils.DateUtils;
import com.sdb.docters.dto.Departmentvo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sdb.docters.mapper.TdDoctersMapper;
import com.sdb.docters.domain.TdDocters;
import com.sdb.docters.service.ITdDoctersService;

/**
 * 医生信息Service业务层处理
 * 
 * @author yyh
 * @date 2024-12-26
 */
@Service
public class TdDoctersServiceImpl implements ITdDoctersService 
{
    @Autowired
    private TdDoctersMapper tdDoctersMapper;

    /**
     * 查询医生信息
     * 
     * @param docterId 医生信息主键
     * @return 医生信息
     */
    @Override
    public TdDocters selectTdDoctersByDocterId(Long docterId)
    {
        return tdDoctersMapper.selectTdDoctersByDocterId(docterId);
    }

    /**
     * 查询医生信息列表
     * 
     * @param tdDocters 医生信息
     * @return 医生信息
     */
    @Override
    public List<TdDocters> selectTdDoctersList(TdDocters tdDocters)
    {
        return tdDoctersMapper.selectTdDoctersList(tdDocters);
    }

    /**
     * 查询未绑定账号医生信息列表
     *
     * @return 医生信息
     */
    @Override
    public List<TdDocters> nouserDocterlist(TdDocters tdDocters) {
        return tdDoctersMapper.nouserDocterlist();
    }

    /**
     * 新增医生信息
     * 
     * @param tdDocters 医生信息
     * @return 结果
     */
    @Override
    public int insertTdDocters(TdDocters tdDocters)
    {
        tdDocters.setCreateTime(DateUtils.getNowDate());
        return tdDoctersMapper.insertTdDocters(tdDocters);
    }

    /**
     * 修改医生信息
     * 
     * @param tdDocters 医生信息
     * @return 结果
     */
    @Override
    public int updateTdDocters(TdDocters tdDocters)
    {
        return tdDoctersMapper.updateTdDocters(tdDocters);
    }

    /**
     * 批量删除医生信息
     * 
     * @param docterIds 需要删除的医生信息主键
     * @return 结果
     */
    @Override
    public int deleteTdDoctersByDocterIds(Long[] docterIds)
    {
        return tdDoctersMapper.deleteTdDoctersByDocterIds(docterIds);
    }

    /**
     * 删除医生信息信息
     * 
     * @param docterId 医生信息主键
     * @return 结果
     */
    @Override
    public int deleteTdDoctersByDocterId(Long docterId)
    {
        return tdDoctersMapper.deleteTdDoctersByDocterId(docterId);
    }

    /**
     * 获取科室信息
     */
    @Override
    public List<Departmentvo> departlist() {
        return tdDoctersMapper.departlist();
    }

    /**
     * 获取医生信息
     */
    @Override
    public List<TdDocters> docterlistbydept(TdDocters tdDocters) {
        return tdDoctersMapper.docterlistbydept(tdDocters);
    }

}
